perm filename PURGE.REG[UP,DOC]1 blob sn#002794 filedate 1972-10-09 generic text, type T, neo UTF8
	Purger Documentation

	R. E. Gorin
	June 7, 1972


	The purger program is used to  enforce  management  decisions
that define the valid users and their disk quotas.

	The  purger  counts the size of each user's files.  If a user
is known to the system management then there will  be  a  disk  quota
associated  with that user.  Unknown users have a disk quota of zero.

	If  a user is over his allocation then the purger will select
files to delete.


	An  authorized  user  who  is  over his quota can specify the
purge order for his files.  This specification is accomplished  by  a
line  in  the  file OPTION.TXT on any of the user's areas.   The line
that the purger reads is called the "purge line." Only one purge line
is  allowed  for  each  user. The purger will read each of the user's
OPTION.TXT files (since there may be one for each of his disk  areas)
until  it finds one with a purge line. (Note that if two option files
have purge lines only one of these will be seen. The order  in  which
option files are read is undefined.)

	The   "purge   line"  has  the  following  format.   In  this
description curly brackets "{" and "}" denote optional items.  Pointy
brackets  "<"  and  ">" denote syntactic quantities which are defined
below. The asterisk that appears below is the Kleene star.

<Purge Line>	→	PURGE: <term>{,<term>}*;
<term> 		→	{<purge order>,}{<proj>}<file spec>
<file spec>	→	<name>{.<name>}{<proj>}
<proj>		→	[<name>]
<purge order>	→	#<number>

<number>	→	'string of decimal digits'
<name>		→	'string of alpha-numeric characters' |
			↓'string of sixbit characters'↓  |
			*

strings above that are enclosed in single  quotes  are  meant  to  be
informal definitions of the data required.

Semantics applying to the purge line.

	Each of a user's files is assigned a number, the purge order,
that determines the order of file deletion. The  purge  line  defines
the purge order of every one of a user's files.

	Every  <term>  in the purge line has a purge order associated
with it. A term that does not explicitly specify a <purge order> will
have  a  purge  order  that is one greater than the term to its left.
The first term on the line (the leftmost) will have purge order =  1,
unless  that is over-ridden by an explicit purge order.   If a <purge
order> term is seen then that purge order will be associated with the
next  term.  Subsequent  terms will be given consecutive purge orders
unless reset by another <purge order>.

	If [<proj>] appears at the front of a term,  then  that  term
and  all subsequent terms will apply to that project area until reset
by another such term.


	The terms are then  sorted  in  order  of  their  "degree  of
specification." The "degree of specification" is defined as follows:

	Term 		degree of specification

	nnnnnn.eee[ppp]		1		most specific
	nnnnnn.*  [ppp]		2
	*     .eee[ppp]		3
	*     .*  [ppp]		4
	nnnnnn.eee[*]		5
	nnnnnn.*  [*]		6
	*     .eee[*]		7
	*     .*  [*]		8		least specific

	The most  specific  terms  are  processed  first.   Any  file
matched  by a term, and not matched by a more specific term, is given
that term's purge order.  When all terms  are  exhausted,  any  files
that  have  not  been matched are given a purge order that is greater
than any purge order used thus far.

	Files are deleted in increasing purge order.

	No files belonging to an  authorized  user  will  be  deleted
unless they have been dumped. EXCEPT RPG and REL files are deleted regardless
of their dump status.



	If no purge line is found in any option file then
the following default line will be used:

PURGE:*.TMP,*.TEM,*.RPG,*.LST,*.REL,*.DMP,*.LAP;


NOTE:    The option file must be either bare text or SOS format,
else, it may not be interpreted properly.


Example:

PURGE:	FOO.*,GARPLY.REL[S],*.REL,*.RPG,*.TMP,*.*,FOO.BAZ,GARPLY.*,*.*[s];
This example is fairly complex.  
	Term		Purge order		Specification
	FOO.*		1			6
	GARPLY.REL[S]	2			1
	*.REL		3			7
	*.RPG		4			7
	*.TMP		5			7
	*.*		6			8
	FOO.BAZ		7			5
	GARPLY.*	8			6
	*.*[s]		9			4

Files will be purged in the following order:
	1.	FOO.*[*], except see 7 and 9 below.
	2.	Garply.rel[s] 
	3,4,5	*.rel,*.rpg,*.tmp (except see 8 below)
	6	any other files, except see below
	7	Foo.baz[*]
	8	Garply.*[*]
	9	*.*[s]

	foo.* will not delete foo.baz[*], or foo.*[s]
	Garply.rel[s] will be not be given order 8 or 9 because
		it is more specific.
	rel, rpg and tmp files will not be deleted from [s] until 9.
	Any files not described by 7,8,9 will be deleted by 6.